import { Inject, Controller, Get, Query } from '@midwayjs/core'
import { Context } from '@midwayjs/koa'
import { UserService } from '@/service/user.service'

@Controller('/admin/auth')
export class APIController {
  @Inject()
  ctx: Context

  @Inject()
  userService: UserService

  @Get('/user')
  async user(@Query('uid') uid) {
    const user = await this.userService.findAll()
    return { success: true, message: 'OK', data: user }
  }
}
